package _spring_test;

import org.springframework.beans.factory.FactoryBean;

/**
 * @Author: huangya
 * @Date: 2019/8/30
 * @Description:
 */
public class CarFactoryBean implements FactoryBean {

    private Car car;

    {
        car = new Car();
        car.setBrand("beandtest1");
        car.setSeries("seriestest1");
    }

    @Override
    public Object getObject() throws Exception {
        return car;
    }

    @Override
    public Class<?> getObjectType() {
        return Car.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
